package com.shop.loan.model.entity;

import com.shop.loan.model.vo.GoodsVo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class GoodsByMybatis {
    /**
     * 
     */
    private Long id;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 排序数值
     */
    private Integer bySort;

    /**
     * 
     */
    private Date deleteTime;

    /**
     * 商品类型
     */
    private Integer goodsType;

    /**
     * 
     */
    private Boolean isDelete;

    /**
     * 是否热门
     */
    private Boolean isHot;

    /**
     * app是否显示
     */
    private Boolean isShow;

    /**
     * 是否包邮
     */
    private Boolean logistics;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 图片
     */
    private String pics;

    /**
     * 总出售数量
     */
    private Integer rentalStock;

    /**
     * 总库存
     */
    private Integer totalStock;

    /**
     * 
     */
    private Long createUserId;

    /**
     * 
     */
    private Long updateUserId;

    /**
     * 所属类目
     */
    private Long classifyId;

    /**
     * 
     */
    private Boolean channelShow;

    /**
     * 详情
     */
    private String detail;

    private String classifyIdStr;

    private BigDecimal minMoney;

    private List<GoodsSizeByMybatis> goodsSizes;

    public GoodsByMybatis(Long id, Date createTime, Date updateTime, Integer bySort, Date deleteTime, Integer goodsType, Boolean isDelete, Boolean isHot, Boolean isShow, Boolean logistics, String name, String pics, Integer rentalStock, Integer totalStock, Long createUserId, Long updateUserId, Long classifyId, Boolean channelShow) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.bySort = bySort;
        this.deleteTime = deleteTime;
        this.goodsType = goodsType;
        this.isDelete = isDelete;
        this.isHot = isHot;
        this.isShow = isShow;
        this.logistics = logistics;
        this.name = name;
        this.pics = pics;
        this.rentalStock = rentalStock;
        this.totalStock = totalStock;
        this.createUserId = createUserId;
        this.updateUserId = updateUserId;
        this.classifyId = classifyId;
        this.channelShow = channelShow;
    }

    public GoodsByMybatis(Long id, Date createTime, Date updateTime, Integer bySort, Date deleteTime, Integer goodsType, Boolean isDelete, Boolean isHot, Boolean isShow, Boolean logistics, String name, String pics, Integer rentalStock, Integer totalStock, Long createUserId, Long updateUserId, Long classifyId, Boolean channelShow, String detail) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.bySort = bySort;
        this.deleteTime = deleteTime;
        this.goodsType = goodsType;
        this.isDelete = isDelete;
        this.isHot = isHot;
        this.isShow = isShow;
        this.logistics = logistics;
        this.name = name;
        this.pics = pics;
        this.rentalStock = rentalStock;
        this.totalStock = totalStock;
        this.createUserId = createUserId;
        this.updateUserId = updateUserId;
        this.classifyId = classifyId;
        this.channelShow = channelShow;
        this.detail = detail;
    }

    public GoodsByMybatis(GoodsVo goodsVo) {
        this.name = goodsVo.getName();
        if (goodsVo.getIsHot() != null && goodsVo.getIsHot() == 1) {
            this.isHot = true;
        }
    }

    public GoodsByMybatis() {
        super();
    }

    /**
     * 获取
     * @return id 
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置
     * @param id 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取
     * @return create_time 
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置
     * @param createTime 
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取
     * @return update_time 
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置
     * @param updateTime 
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取排序数值
     * @return by_sort 排序数值
     */
    public Integer getBySort() {
        return bySort;
    }

    /**
     * 设置排序数值
     * @param bySort 排序数值
     */
    public void setBySort(Integer bySort) {
        this.bySort = bySort;
    }

    /**
     * 获取
     * @return delete_time 
     */
    public Date getDeleteTime() {
        return deleteTime;
    }

    /**
     * 设置
     * @param deleteTime 
     */
    public void setDeleteTime(Date deleteTime) {
        this.deleteTime = deleteTime;
    }

    /**
     * 获取商品类型
     * @return goods_type 商品类型
     */
    public Integer getGoodsType() {
        return goodsType;
    }

    /**
     * 设置商品类型
     * @param goodsType 商品类型
     */
    public void setGoodsType(Integer goodsType) {
        this.goodsType = goodsType;
    }

    /**
     * 获取
     * @return is_delete 
     */
    public Boolean getIsDelete() {
        return isDelete;
    }

    /**
     * 设置
     * @param isDelete 
     */
    public void setIsDelete(Boolean isDelete) {
        this.isDelete = isDelete;
    }

    /**
     * 获取是否热门
     * @return is_hot 是否热门
     */
    public Boolean getIsHot() {
        return isHot;
    }

    /**
     * 设置是否热门
     * @param isHot 是否热门
     */
    public void setIsHot(Boolean isHot) {
        this.isHot = isHot;
    }

    /**
     * 获取app是否显示
     * @return is_show app是否显示
     */
    public Boolean getIsShow() {
        return isShow;
    }

    /**
     * 设置app是否显示
     * @param isShow app是否显示
     */
    public void setIsShow(Boolean isShow) {
        this.isShow = isShow;
    }

    /**
     * 获取是否包邮
     * @return logistics 是否包邮
     */
    public Boolean getLogistics() {
        return logistics;
    }

    /**
     * 设置是否包邮
     * @param logistics 是否包邮
     */
    public void setLogistics(Boolean logistics) {
        this.logistics = logistics;
    }

    /**
     * 获取商品名称
     * @return name 商品名称
     */
    public String getName() {
        return name;
    }

    /**
     * 设置商品名称
     * @param name 商品名称
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * 获取图片
     * @return pics 图片
     */
    public String getPics() {
        return pics;
    }

    /**
     * 设置图片
     * @param pics 图片
     */
    public void setPics(String pics) {
        this.pics = pics == null ? null : pics.trim();
    }

    /**
     * 获取总出售数量
     * @return rental_stock 总出售数量
     */
    public Integer getRentalStock() {
        return rentalStock;
    }

    /**
     * 设置总出售数量
     * @param rentalStock 总出售数量
     */
    public void setRentalStock(Integer rentalStock) {
        this.rentalStock = rentalStock;
    }

    /**
     * 获取总库存
     * @return total_stock 总库存
     */
    public Integer getTotalStock() {
        return totalStock;
    }

    /**
     * 设置总库存
     * @param totalStock 总库存
     */
    public void setTotalStock(Integer totalStock) {
        this.totalStock = totalStock;
    }

    /**
     * 获取
     * @return create_user_id 
     */
    public Long getCreateUserId() {
        return createUserId;
    }

    /**
     * 设置
     * @param createUserId 
     */
    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * 获取
     * @return update_user_id 
     */
    public Long getUpdateUserId() {
        return updateUserId;
    }

    /**
     * 设置
     * @param updateUserId 
     */
    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    /**
     * 获取所属类目
     * @return classify_id 所属类目
     */
    public Long getClassifyId() {
        return classifyId;
    }

    /**
     * 设置所属类目
     * @param classifyId 所属类目
     */
    public void setClassifyId(Long classifyId) {
        this.classifyId = classifyId;
    }

    /**
     * 获取
     * @return channel_show 
     */
    public Boolean getChannelShow() {
        return channelShow;
    }

    /**
     * 设置
     * @param channelShow 
     */
    public void setChannelShow(Boolean channelShow) {
        this.channelShow = channelShow;
    }

    /**
     * 获取详情
     * @return detail 详情
     */
    public String getDetail() {
        return detail;
    }

    /**
     * 设置详情
     * @param detail 详情
     */
    public void setDetail(String detail) {
        this.detail = detail == null ? null : detail.trim();
    }
}